package com.aabte.hystrixlearn.common;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

import javax.annotation.PostConstruct;

/**
 * @author Daniel
 */
@Component
public class HttpClientUtil {

    private static RestTemplate instance;
    @Autowired
    private RestTemplate restTemplate;

    public static RestTemplate getInstance() {
        return instance;
    }

    @PostConstruct
    public void setup() {
        instance = restTemplate;
    }

}
